<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>线性渐变</title>
    <style>
        .ceng {
            width: 260px;
            height: 200px;
            border: 1px solid #000;
            margin: 100px auto;
            background-image: linear-gradient(to right, orange, green, red);
            background-image: -webkit-linear-gradient(to right, orange, green, red);
            background-image: -o-linear-gradient(to right, orange, green, red);
        }
    </style>
</head>
<body>
    <div class="ceng"></div>
</body>
</html>